<template>
  <div class="myorder">
    <Navbar />
    <div class="content">
        <div class="left">
            <p @click="currentIndex=0">我的订单</p>

            <p @click="currentIndex=1">个人中心</p>
        </div>
        <div class="right">
            <div v-show="currentIndex==0">
                <OrderCenter/>
            </div>
            <div v-show="currentIndex==1">
                <PerCenter/>
            </div>
            <!-- <p v-show="currentIndex==1">个人中心</p> -->
        </div>
    </div>
  </div>
</template>

<script>
// 引入头部导航栏组件
import Navbar from "@/components/Navbar.vue"
// 引入我的订单组件
import OrderCenter from "@/components/OrderCenter.vue"
// 引入个人中心组件
import PerCenter from "@/components/PerCenter.vue"
export default{
    name:'myorder',
    data() {
        return {
            currentIndex:0  
        }
    },
    components:{
        Navbar,
        OrderCenter,
        PerCenter,
    }
}

</script>

<style lang='scss' scoped>
@function vw($w) {
    @return ($w/1349) * 100+vw;
}
.myorder{
    .content{
        width: vw(1200);
        min-height: vw(300);
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        .left{
            width: vw(200);
            font-size: vw(18);
            text-align: center;
            background-color: rgb(243, 237, 237);
            display: flex;
            flex-direction: column;
            
            p{
                margin-top: vw(20);
                cursor: pointer;
            }
        }
    }
}
</style>
